<template>
  <div class="noticeList">
    <breadcrumb class="breadcrumb-container"></breadcrumb>
    <el-card class="title">
      <h3 class="tip">标题：{{ title }}</h3>
      <p>发布时间：{{ time }}</p>
    </el-card>
    <el-card>
      <p>内容：</p>
      <div v-html="content">
        {{ content }}
      </div>
    </el-card>
  </div>
</template>

<script>
import Breadcrumb from '@/components/Breadcrumb'
import { listInit } from '@/api/notice'
export default {
  name: 'meslist',
  components: {
    Breadcrumb
  },
  data() {
    return {
      time: '',
      title: '',
      content: ''
    }
  },
  created() {
    if (this.$route.query.type === 2) {
      listInit(this.$route.query.id).then(response => {
        this.title = response.data.result.title
        this.time = response.data.result.created_at
        this.content = response.data.result.content
      })
    }
  }
}
</script>

<style lang="scss" scoped>
.noticeList {
  .el-card{
    width: 500px;
    margin-bottom: 20px;
    p{
      margin: 0;
      padding-bottom: 10px;
    }
    h3{
      margin:0 0 10px 0;
      font-weight: 400;
    }
    /deep/ img{
      width: 100%;
      height: auto;
    }
  }
  .title{
    p{
      font-size: 14px;
    }
  }
}
</style>
